<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

/**
 * API 路由
 * ->middleware('api.lang')
 */
Route::namespace('App\Http\Controllers\Api')->group(function () {
    // 首页
    Route::namespace('Index')->prefix('index')->group(function () {
        // 首页数据
        Route::get('home_info', 'IndexController@homeInfo')->name('api_index_home_info');
        // 底部数据
        Route::get('footer', 'IndexController@footer')->name('api_index_footer');
    });
    // 新闻、学术成果
    Route::namespace('News')->prefix('news')->group(function () {
        // 新闻列表
        Route::get('news_list', 'NewsController@list')->name('api_news_list');
        // 新闻详情
        Route::get('news_detail', 'NewsController@detail')->name('api_news_detail');
        // 学术成果列表
        Route::get('result_list', 'ResultController@list')->name('api_result_list');
        // 学术成果详情
        Route::get('result_detail', 'ResultController@detail')->name('api_result_detail');
    });
    // Publications
    Route::namespace('Publication')->prefix('publication')->group(function () {
        // Publications
        Route::get('group_list', 'PublicationController@groupList')->name('api_publication_group_list');
    });
    // 学术科研
    Route::namespace('Research')->prefix('research')->group(function () {
        // 科研列表
        Route::get('list', 'ResearchController@researchList')->name('api_research_list');
    });
    // 人才招聘
    Route::namespace('Member')->prefix('members')->group(function () {
        // 人才招聘-招聘列表
        Route::get('list', 'MemberController@list')->name('api_member_list');
    });
    // 联系我们
    Route::namespace('Contact')->prefix('contact')->group(function () {
        // 联系信息
        Route::get('join_us', 'ContactController@joinUs')->name('api_contact_join_us');
    });
});
